﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hello
{
    class HelloWorld
    {
        public static void Main(string[] args)
        {
            WriteCharacterStrings(0, 26);
            Console.WriteLine("Hello World! and 大王叫我来巡山， 我把人间转一转");
            Console.ReadKey();
            resetStrings();
            Console.Clear();
            foreach(string str in args)
            {
                Console.WriteLine("your strings is {0} {1} {2}", str, str, str);
                Console.WriteLine("当前缓冲区的高度为：{0} 当前缓冲区的宽度为：{1}", Console.BufferHeight, Console.BufferWidth);
                
            }
        }

        private static void resetStrings()
        {
            if(Console.BackgroundColor != ConsoleColor.Black || Console.ForegroundColor != ConsoleColor.White)
            {
                Console.BackgroundColor = ConsoleColor.Black;
                Console.ForegroundColor = ConsoleColor.White;
            }
        }

        private static void WriteCharacterStrings(int start, int end)
        {
            for (int ctr = start; ctr <= end; ctr++)
            {
                Console.BackgroundColor = (ConsoleColor)(ctr % 16);
                Console.ForegroundColor = (ConsoleColor)((ctr + 3) % 16);
                Console.WriteLine("{0 :f}", System.DateTime.Now);
            }
        }
    }
}
